package com.beehoo.dcportal.action;

import java.util.List;

import com.beehoo.dcportal.common.base.BaseAction;
import com.beehoo.dcportal.common.base.BaseException;
import com.beehoo.dcportal.model.RelatedLinkBean;
import com.beehoo.dcportal.service.IRelatedLinkServ;

public class RelatedLinkAction extends BaseAction{
	private static final long serialVersionUID = 5317228883925534288L;
	private List<RelatedLinkBean> linkList;
	private IRelatedLinkServ relatedLinkServ;
	
	public List<RelatedLinkBean> getLinkList() {
		return linkList;
	}

	public void setLinkList(List<RelatedLinkBean> linkList) {
		this.linkList = linkList;
	}

	public IRelatedLinkServ getRelatedLinkServ() {
		return relatedLinkServ;
	}

	public void setRelatedLinkServ(IRelatedLinkServ relatedLinkServ) {
		this.relatedLinkServ = relatedLinkServ;
	}

	@Override
	public String execute() throws Exception {
		try{
			linkList = relatedLinkServ.getRelatedLinkList(paramMap.get("streetId"));
		}catch (BaseException e) {
			setMessage(e.getMessage());
			return ERROR;
		}
		
		return SUCCESS;
	}
}
